Repository navigation
CI: run on the owner's runner in the private repo - #6
Conversation
Published from the private repository by oss-sync. - CI: run on the owner's runner in the private repo 2 files changed, 8 insertions(+), 2 deletions(-)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c397232fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ${{ github.event.repository.private && 'box' || 'ubuntu-latest' }} |
There was a problem hiding this comment.
Keep untrusted PRs off the self-hosted runner
When private-repository forking is enabled, a read-only collaborator can open a pull request whose code is checked out here and then executed by npm ci/npm test on the persistent box host. The repository.private condition therefore does not establish that PR code is trusted; route fork-origin PRs to a hosted runner (for example, by comparing the head repository with github.repository) or use an isolated ephemeral runner to prevent a PR from gaining the runner account's access to the owner's machine.
Useful? React with 👍 / 👎.
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ${{ github.event.repository.private && 'box' || 'ubuntu-latest' }} |
There was a problem hiding this comment.
Preserve CI for private copies without the owner’s runner
A private fork or copy that follows the repository's setup instructions has only a runner labeled krakatoa-deploy, registered with --no-default-labels (docs/self-hosting.md:317-321), so it has no runner matching box. GitHub documents that a job with no matching self-hosted runner remains queued and eventually fails after 24 hours (self-hosted runner routing); consequently CI never completes—and the workflow_run deployment never starts—for these installations. Select box through an explicit opt-in configuration or document and provision the additional runner instead of treating every private repository as the owner's configured repository.
Useful? React with 👍 / 👎.
| concurrency: | ||
| group: ci-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
Deploy the SHA that actually passed serialized CI
With two quick pushes to main, the first CI run remains active and the newer run waits in this concurrency group because cancel-in-progress is false for pushes. As soon as the older run succeeds, deploy.yml starts and lines 62-64 fetch and merge the current origin/main, so it can deploy the newer commit while that commit's CI has only just started and has not passed; GitHub confirms that concurrency permits one running and one pending run (concurrency behavior). Make the deployment consume github.event.workflow_run.head_sha (or otherwise verify that the tested SHA is still the deploy target) instead of pulling the latest branch tip.
Useful? React with 👍 / 👎.
Published from the private repository by oss-sync.
2 files changed, 8 insertions(+), 2 deletions(-)